Offscreen Toys is a nice little demo I made to make a SAT-like demo with complete source
code, independent of any libraries (except Apple's). Now, this should be easier to do with
SAT, right? Well, partially so, but while adapting it to SAT, I ran into a minor flaw that
SAT had (and doesn't have from version 2.1 and up), namely that drawing took place after
moving sprites, but before checking for collisions, which didn't look too good in programs
where sprites bounce off each other. After fixing this flaw, I would say that the SAT
version is indeed a bit better than the independent version. The result is quite a bit faster
and with asynch sound.
Please don't confuse Offscreen Toys SAT with the original Offscreen Toys! They are two different demos, and neither makes the other obsolete.
As yet another SAT demo, what does it give us?
• If you wonder what it costs to have a real event loop, or good collision handling, this demo
shows that pretty well.
• Demonstrates a moveable window AND fast mode at the same time, with the precautions
that demands when moving the window. (The window mustn't be moved outside the screen,
some internal SAT variables – that you otherwise should never care about – must be adjusted,
and we must stay word-aligned to make it work in b/w).
I don't consider this demo final in any way. Known flaws:
• The code for the marble should be separated from the main program, to make the code easier
to follow.
I'll fix those things when I find time and inspiration for it - but you are welcome to do it if
you want!
C translation by Charles Brunet (cbrunet@geocities.com) 1996. Comments with "-- Charles" are his. The resource file name was changed to reflect the moronic resource file handling in Think C.